package com.crscd.ai.assistant;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import reactor.core.publisher.Flux;

/**
 * Created with IntelliJ IDEA.
 *
 * @description:
 * @author: liuziyang
 * @since: 9/24/25 5:13 PM
 * @modifiedBy:
 * @version: 1.0
 */
@AiService(
    wiringMode = EXPLICIT,
    streamingChatModel = "qwenStreamingChatModel",
    chatMemoryProvider = "chatMemoryProviderXiaoZhi",
    contentRetriever = "contentRetrieverXiaoZhi",
    tools = "appointmentTools")
public interface XiaoZhiAgent {
  /**
   * Chat string.
   *
   * @param memoryId the memory id
   * @param userMessage the user message
   * @return the string
   */
  @SystemMessage(fromResource = "xiaozhi-prompt-template.txt")
  Flux<String> chat(@MemoryId Long memoryId, @UserMessage String userMessage);
}
